import service from '@/util/request.js';

const defaultPrefix = '/items';

export function getGoodListService(itemQuery) {
  return service.post(defaultPrefix + '/list', itemQuery);
}

export function addGoodService(item) {
  return service.post(defaultPrefix, item);
}

export function updateGoodService(item) {
  return service.put(defaultPrefix, item);
}

export function deleteGoodService(itemId) {
  return service.delete(defaultPrefix + '/' + itemId);
}

export function batchDeleteGoodService(itemIds) {
  return service.post(defaultPrefix + '/delete', itemIds);
}